package com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow;

import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 供应商评级信息表(VendorRateDetail)实体类
 *
 * @author zzp
 * @since 2023-12-06 10:06:08
 */

@Data
@Entity
@ToString
//@Where(clause = "deleted = 0" )
//@SQLDelete(sql = "update t_gw_flow_form_vendor_rate_answer set deleted = 0 where id=?")
//@SQLDeleteAll(sql = "update t_gw_flow_form_vendor_rate_answer set deleted = 0 where id=?")
@Table(name = "t_gw_flow_form_vendor_rate_answer")
@org.hibernate.annotations.Table(appliesTo = "t_gw_flow_form_vendor_rate_answer", comment = "供应商评级打分明细表")
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class FlowFormVendorRateAnswer implements Serializable {
    private static final long serialVersionUID = -45093077932154861L;

    @Id
    @Column(name = "answer_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer answerId;

    @Column(name = "process_id", columnDefinition = "varchar(64) comment '唯一编号'")
    private String processId;

    /**
     * 题目id
     */
    @ApiModelProperty(value = "题目id")
    @Column(name = "question_id", columnDefinition = "int COMMENT '题目id'")
    private Integer questionId;

    /**
     * 评级套题编码，汇总题目
     */
    @ApiModelProperty(value = "评级套题编码，汇总题目")
    @Column(name = "exam_code", columnDefinition = "varchar(20) COMMENT '评级套题编码，汇总题目'")
    private String examCode;

    /**
     * 评价项目
     */
    @ApiModelProperty(value = "评价项目")
    @Column(name = "question_info", columnDefinition = "varchar(200) COMMENT '评价项目'")
    private String questionInfo;

    /**
     * 评分说明
     */
    @ApiModelProperty(value = "评分说明")
    @Column(name = "question_remark", columnDefinition = "varchar(500) COMMENT '评分说明'")
    private String questionRemark;

    /**
     * 默认得分
     */
    @ApiModelProperty(value = "默认得分")
    @Column(name = "default_score", columnDefinition = "int COMMENT '默认得分'")
    private Integer defaultScore;


    /**
     * 最高得分
     */
    @ApiModelProperty(value = "最高得分")
    @Column(name = "max_score", columnDefinition = "int COMMENT '最高得分'")
    private Integer maxScore;

    /**
     * 惩罚扣分最大值，负数
     */
    @ApiModelProperty(value = "惩罚扣分最大值，负数")
    @Column(name = "max_penalty_score", columnDefinition = "int COMMENT '惩罚扣分最大值'")
    private Integer maxPenaltyScore;
    /**
     * 惩罚扣分最小值，负数
     */
    @ApiModelProperty(value = "惩罚扣分最小值，负数")
    @Column(name = "min_penalty_score", columnDefinition = "int COMMENT '惩罚扣分最小值'")
    private Integer minPenaltyScore;

    /**
     * 低于此分数需要补充的说明
     */
    @ApiModelProperty(value = "低于此分数需要补充的说明")
    @Column(name = "explain_below_score", columnDefinition = "int COMMENT '低于此分数需要补充的说明'")
    private Integer explainBelowScore;

    /**
     * 题目排序
     */
    @ApiModelProperty(value = "题目排序")
    @Column(name = "sort_no", columnDefinition = "int COMMENT '题目排序'")
    private Integer sortNo;

    //以上为评分题目定义要素------------------------------------------------------------------------


    /**
     * 实际得分
     */
    @ApiModelProperty(value = "评价得分")
    @Column(name = "answer_score", columnDefinition = "int COMMENT '评价得分'")
    private Integer answerScore;

    /**
     * 实际得分过低说明
     */
    @ApiModelProperty(value = "低分说明")
    @Column(name = "below_score_explain", columnDefinition = "text COMMENT '低分说明'")
    private String belowScoreExplain;


    /**
     * 实际扣分
     */
    @ApiModelProperty(value = "扣分，0标识未扣分")
    @Column(name = "penalty_score", columnDefinition = "int COMMENT '扣分，0标识未扣分'")
    private Integer penaltyScore;

    /**
     * 扣分说明
     */
    @ApiModelProperty(value = "扣分说明")
    @Column(name = "penalty_score_explain", columnDefinition = "text COMMENT '扣分说明'")
    private String penaltyScoreExplain;

    /**
     * 创建人账号
     */
    @ApiModelProperty(value = "创建人账号")
    @Column(name = "create_operator", columnDefinition = "varchar(20) COMMENT '创建人账号'")
    private String createOperator;
    /**
     * 创建人姓名
     */
    @ApiModelProperty(value = "创建人姓名")
    @Column(name = "create_operator_name", columnDefinition = "varchar(20) COMMENT '创建人姓名'")
    private String createOperatorName;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @Column(name = "create_time", columnDefinition = "datetime COMMENT '创建时间'")
    private Date createTime;
    /**
     * 最近一次修改人账号
     */
    @ApiModelProperty(value = "最近一次修改人账号")
    @Column(name = "op_operator", columnDefinition = "varchar(20) COMMENT '最近一次修改人账号'")
    private String opOperator;
    /**
     * 最近一次修改姓名
     */
    @ApiModelProperty(value = "最近一次修改姓名")
    @Column(name = "op_operator_name", columnDefinition = "varchar(20) COMMENT '最近一次修改姓名'")
    private String opOperatorName;
    /**
     * 最近一次修改时间
     */
    @ApiModelProperty(value = "最近一次修改时间")
    @Column(name = "op_time", columnDefinition = "datetime COMMENT '最近一次修改时间'")
    private Date opTime;

}

